package com.hnhs.test;

import com.hnhs.mapper.CategoryMapper;
import com.hnhs.model.Category;
import com.hnhs.service.CategoryService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.util.List;

@SpringBootTest
@RunWith(SpringRunner.class)
public class Categorytest {
    @Autowired
    private CategoryMapper mapper;
    @Autowired
    private CategoryService service;
    @Test
    public void findtest(){
        List<Category> all = service.findAll();
        for (Category category : all) {
            System.out.println(category);
        }
    }
}
